import asyncPages from "./AsyncComponent";

const Page404 = asyncPages(() => import(/* webpackChunkName: "page-404" */ "@/pages/404/404"));
const Home = asyncPages(() => import(/* webpackChunkName: "home" */ "@/pages/home/Home"));
const Game = asyncPages(() => import(/* webpackChunkName: "game" */ "@/pages/game/Game"));
const Poster = asyncPages(() => import(/* webpackChunkName: "poster" */ "@/pages/poster/Poster"));
const PosterSaleTab = asyncPages(() => import(/* webpackChunkName: "posterSaleTab" */ "@/pages/posterSaleTab/PosterSaleTab"));
const CanvasLib = asyncPages(() => import(/* webpackChunkName: "canvasLib" */ "@/pages/canvasLib/CanvasLib"));
const HtmlTag = asyncPages(() => import(/* webpackChunkName: "htmlTag" */ "@/pages/htmlTag/HtmlTag"));
const SpaceMove = asyncPages(() => import(/* webpackChunkName: "spaceMove" */ "@/pages/cssLib/spaceMove"));

// 基础路由
const baseRouter = [
  {
    path: "/404",
    name: "Page404",
    title: "404",
    requiresAuth: true,
    component: Page404,
  },
  {
    path: "/",
    redirect: "/home",
    name: "Home",
    strict: true,
    exact: true,
    requiresAuth: true,
  },
  {
    path: "/home",
    name: "Home",
    title: "首页",
    requiresAuth: true,
    component: Home,
  },
  {
    path: "/game",
    name: "Game",
    title: "游戏",
    requiresAuth: true,
    component: Game,
  },
  {
    path: "/poster",
    name: "Poster",
    title: "海报",
    requiresAuth: true,
    component: Poster,
  },
  {
    path: "/posterSaleTab",
    name: "Poster",
    title: "海报",
    requiresAuth: true,
    component: PosterSaleTab,
  },
  {
    path: "/canvasLib",
    name: "Poster",
    title: "海报",
    requiresAuth: true,
    component: CanvasLib,
  },
  {
    path: "/htmlTag",
    name: "HtmlTag",
    title: "html标签",
    requiresAuth: true,
    component: HtmlTag,
  },
  {
    path: "/spaceMove",
    name: "SpaceMove",
    title: "CSS星空",
    requiresAuth: true,
    component: SpaceMove,
  },
];

export { baseRouter };
